import React from 'react'
import style from './index.module.css'
import { useNavigate } from 'react-router-dom'

export default function PubNav(props: { title: string }) {
  const navigate = useNavigate()
  const { title } = props
  return (
    <div className={style['nav']}>
      <div
        className={style['back']}
        onClick={() => {
          navigate(-1)
        }}
      >
        <img src="/static/arrow/icon-back-212.png" alt="" />
      </div>
      <div className={style['title']}>{title}</div>
      <div
        style={{
          width: '30px',
          height: '46px'
        }}
      ></div>
    </div>
  )
}
